home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / boot / initrd.img-2.6.28-15-generic / initrd.img-2.6 / scripts / casper-bottom / 44pk_allow_ubuntu < prev    next >
Encoding:
Text File  |  2009-10-12  |  922 b   |  45 lines

  1. #!/bin/sh
  2.  
  3. PREREQ=""
  4. DESCRIPTION="Grant administrative PolicyKit pivilieges to default user..."
  5.  
  6. . /scripts/casper-functions
  7.  
  8. prereqs()
  9. {
  10.        echo "$PREREQ"
  11. }
  12.  
  13. case $1 in
  14. # get pre-requisites
  15. prereqs)
  16.        prereqs
  17.        exit 0
  18.        ;;
  19. esac
  20.  
  21. log_begin_msg "$DESCRIPTION"
  22.  
  23. # configure PolicyKit in live session
  24. cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
  25. <?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
  26.  
  27. <!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
  28. "http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
  29.  
  30. <!-- See the manual page PolicyKit.conf(5) for file format -->
  31.  
  32. <config version="0.1">
  33.     <match user="root">
  34.         <return result="yes"/>
  35.     </match>
  36.     <!-- don't ask password for user in live session -->
  37.     <match user="$USERNAME">
  38.         <return result="yes"/>
  39.     </match>
  40.     <define_admin_auth group="admin"/>
  41. </config>
  42. EOF
  43.  
  44. log_end_msg
  45.